//SamXIAO
#include <bits/stdc++.h>
using namespace std;
#define PI 3.1415926
#define   SQUARE(x) ((x)*(x))
//double SQUARE(double x) { return x*x;}
#define N_MAX 987654321
#define N_MIN -N_MAX
int f[10086];
int cnt[10086];

void w1()
{
	int n, x;
	int pre=-N_MAX, ans = 0, cnt = 0;
	scanf("%d", &n);
	for(int i=0; i<n; i++){
		scanf("%d", &x);
		if(i){
			if(pre == x)cnt++;
			else cnt = 1;
		}
		else cnt++;
		if(ans < cnt) ans = cnt;
		pre = x;
  }

	printf("%d", ans);
}

int main()
{
	w1();
  return 0;
}
